// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import VueRouter from 'vue-router';
import Vant from 'vant';
import 'vant/lib/index.css';

import '../static/css/default.css'
import { PullRefresh } from 'vant';
import { Sticky } from 'vant';

Vue.use(Sticky);
Vue.use(PullRefresh);
// import Imgr from './components/imgitm'
// Vue.component('imgr', Imgr)
Vue.config.productionTip = false
Vue.use(VueRouter);
Vue.use(Vant);
/* eslint-disable no-new */
// 登录查看页面限制
// router.beforeEach((to, from, next) => {
//   const arr = ['我的'];
//   if (arr.includes(to.name) && sessionStorage.getItem('_user') === null && sessionStorage.getItem('_pwd') === null) {
//     next('/');
//   } else {
//     next();
//   }
// })


new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})
